package cn.iocoder.yudao.module.of.controller.admin.taskfeedback.vo;

import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.of.controller.admin.taskhandler.vo.TaskHandlerRespVO;
import cn.iocoder.yudao.module.of.controller.admin.taskinfo.dto.DocumentDTO;
import cn.iocoder.yudao.module.of.controller.admin.taskinfo.dto.MeetingDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * @author wyl
 * @date 2025/4/22
 * @des
 */
@Data
public class TaskFeedbackPageResponseVO {
    /**
     * 任务编号
     *//*
    @Schema(description = "任务编号")
    private Long taskId;
    *//**
     * 反馈信息的处理状态:1未反馈，2已反馈
     *//*
    @Schema(description = "反馈信息的处理状态:1未反馈，2已反馈")
    private Integer feedbackStatus = 1;

    *//**
     * 反馈人id
     *//*
    @Schema(description = "反馈人id")
    private Long feedbackUserId;
    *//**
     * 反馈提交的时间
     *//*
    @Schema(description = "反馈提交的时间")
    private LocalDateTime feedbackTime;
    *//**
     * 反馈内容
     *//*
    @Schema(description = "反馈内容")
    private String feedbackContent;
    *//**
     * 反馈的附件
     *//*
    @Schema(description = "反馈的附件")
    private List<FileDO> feedbackAttachmentList;

    *//**
     * 审核人员id
     *//*
    private Long approvalUserId;
    *//**
     * 审核状态:1待审批、2审批通过、3审批不通过
     *//*
    private Integer approvalStatus;
    *//**
     * 审核的时间
     *//*
    private LocalDateTime approvalTime;
    *//**
     * 审核说明
     *//*
    private String approvalContent;

    *//**
     * 子任务二次审核的人员id
     *//*
    private Long approval2UserId;
    *//**
     * 子任务二次反馈审核状态:1待审批、2审批通过、3审批不通过
     *//*
    private Integer approval2Status;
    *//**
     * 子任务二次反馈审核的时间
     *//*
    private LocalDateTime approval2Time;
    *//**
     * 子任务二次审核结果说明
     *//*
    private String approval2Content;*/

    // 下面为任务信息

    // 任务相关属性
    @Schema(description = "主键", example = "31777")
    private Long id;

    @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @NotEmpty(message = "任务名称不能为空")
    private String taskName;

    @Schema(description = "任务描述")
    private String taskDesc;

    @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "任务编号不能为空")
    private String taskCode;

    @Schema(description = "任务来源: 1中心来文、2会议、3领导交办、4其它", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer taskFrom;

    @Schema(description = "任务来源扩展：其它or会议 用得到")
    private String taskFromExt;

    @Schema(description = "任务级别:1主任务、2从任务", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer taskLevel;

    @Schema(description = "任务类型:1全年、2常规", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer taskType;


    @Schema(description = "开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime endTime;

    @Schema(description = "父级任务", example = "8621")
    private Long parentId;


    @Schema(description = "公文信息")
    private DocumentDTO taskDocument;

    @Schema(description = "会议信息")
    private MeetingDTO taskMeeting;

    @Schema(description = "附件")
    private List<FileDO> taskAttachmentList;

    @Schema(description = "公文附件")
    private List<FileDO> taskDocFileList;

    @Schema(description = "状态：1草稿，2提交审核(审核中)，3审核通过，4跟进中,5完成", example = "2")
    private Integer status;

    @Schema(description = "状态：0草稿,1待审批、2审批通过、3审批不通过,4跟进中、5挂起、99结束", example = "2")
    private String statusName;

    /**
     * 任务办理人
     */
    @NotEmpty(message = "任务办理人不能为空")
    List<TaskHandlerRespVO> taskHandlerList;

    @Schema(description = "子任务")
    List<TaskFeedbackPageResponseVO> children;
}
